<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/boma/bom_manager/BOMmanageAdd.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/boma/bom_manager/BOMmanageAdd.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'BomId',
                footer: "Foots",
                cnName: '物料清单表',
                name: 'bom_manager/BOMmanageAdd',
                url: "/BOMmanageAdd/",
                sortName: "CreateDate "
            });
            const editFormFields = ref({"Productnumber":"","Productname":"","Specificationmode":"","Size":"","CreateData":"","Operator":"","BomVersion":""});
            const editFormOptions = ref([[{"title":"成品单编号","field":"Productnumber"}],
                              [{"title":"成品名称","field":"Productname"}],
                              [{"title":"规格型号","field":"Specificationmode"}],
                              [{"title":"尺寸","field":"Size","type":"number"}],
                              [{"title":"创建时间","field":"CreateData","type":"datetime"}],
                              [{"title":"操作人","field":"Operator"}],
                              [{"title":"BOM版本号","field":"BomVersion","type":"number"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'BomId',title:'物料清单主键',type:'guid',width:110,require:true,align:'left',sort:true},
                       {field:'Productnumber',title:'成品单编号',type:'string',width:120,align:'left'},
                       {field:'Productname',title:'成品名称',type:'string',width:120,align:'left'},
                       {field:'Specificationmode',title:'规格型号',type:'string',width:120,align:'left'},
                       {field:'Size',title:'尺寸',type:'int',width:110,align:'left'},
                       {field:'CreateData',title:'创建时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'Operator',title:'操作人',type:'string',width:120,align:'left'},
                       {field:'BomVersion',title:'BOM版本号',type:'int',width:80,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
